<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class Member extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('member', function (Blueprint $table) {
            $table->increments('id');
            $table->string('openid',150)->unique()->nullable()->comment('微信openid');
            $table->string('name',30)->nullable()->comment('用户名');
            $table->string('mobile',11)->unique()->comment('手机号码');
            $table->string('password',50)->comment('密码');
            $table->integer('lev_id')->comment('等级id');
            $table->tinyInteger('status')->default(0)->comment('默认状态0 待审核 1通过 2未通过');
            $table->tinyInteger('sex')->nullable()->default(1)->comment('性别 1男 2女');

            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('member');
    }
}
